package by.admonko.universaltesting.services;

import java.util.Date;
import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import by.admonko.universaltesting.datamodel.Test;
import by.admonko.universaltesting.datamodel.TestResult;
import by.admonko.universaltesting.datamodel.UserGroup;
import by.admonko.universaltesting.datamodel.UserTbl;

public interface TestResultService {
	@Transactional
	void setTestResult(TestResult testResult);

	@Transactional
	TestResult getTestResult(Integer id);

	@Transactional
	List<TestResult> getAllTestResult();

	@Transactional
	List<TestResult> getTestResultByUserGroup(UserGroup userGroup);

	@Transactional
	List<TestResult> getTestResultByUser(UserTbl user);

	@Transactional
	List<TestResult> getTestResultByDate(Date date);

	@Transactional
	List<TestResult> getTestResultByTest(Test test);

	@Transactional
	void removeTestResult(Integer id);// cascade

	@Transactional
	void removeTetResultList(List<Integer> list);// cascade

	@Transactional
	void updateTestResult(TestResult testResult);

}
